package com.ruoyi.user.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.user.mapper.UserWalletAccountMapper;
import com.ruoyi.user.domain.UserWalletAccount;
import com.ruoyi.user.service.IUserWalletAccountService;

/**
 * 用户零钱账户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-21
 */
@Service
public class UserWalletAccountServiceImpl implements IUserWalletAccountService 
{
    @Autowired
    private UserWalletAccountMapper userWalletAccountMapper;

    /**
     * 查询用户零钱账户
     * 
     * @param walletId 用户零钱账户主键
     * @return 用户零钱账户
     */
    @Override
    public UserWalletAccount selectUserWalletAccountByWalletId(String walletId)
    {
        return userWalletAccountMapper.selectUserWalletAccountByWalletId(walletId);
    }

    /**
     * 查询用户零钱账户列表
     * 
     * @param userWalletAccount 用户零钱账户
     * @return 用户零钱账户
     */
    @Override
    public List<UserWalletAccount> selectUserWalletAccountList(UserWalletAccount userWalletAccount)
    {
        return userWalletAccountMapper.selectUserWalletAccountList(userWalletAccount);
    }

    /**
     * 新增用户零钱账户
     * 
     * @param userWalletAccount 用户零钱账户
     * @return 结果
     */
    @Override
    public int insertUserWalletAccount(UserWalletAccount userWalletAccount)
    {
        return userWalletAccountMapper.insertUserWalletAccount(userWalletAccount);
    }

    /**
     * 修改用户零钱账户
     * 
     * @param userWalletAccount 用户零钱账户
     * @return 结果
     */
    @Override
    public int updateUserWalletAccount(UserWalletAccount userWalletAccount)
    {
        return userWalletAccountMapper.updateUserWalletAccount(userWalletAccount);
    }

    /**
     * 批量删除用户零钱账户
     * 
     * @param walletIds 需要删除的用户零钱账户主键
     * @return 结果
     */
    @Override
    public int deleteUserWalletAccountByWalletIds(String[] walletIds)
    {
        return userWalletAccountMapper.deleteUserWalletAccountByWalletIds(walletIds);
    }

    /**
     * 删除用户零钱账户信息
     * 
     * @param walletId 用户零钱账户主键
     * @return 结果
     */
    @Override
    public int deleteUserWalletAccountByWalletId(String walletId)
    {
        return userWalletAccountMapper.deleteUserWalletAccountByWalletId(walletId);
    }

    /**
     * 根据用户ID查询用户零钱账户
     *
     * @param customerId 用户ID
     * @return 用户零钱账户
     */
    @Override
    public UserWalletAccount selectUserWalletAccountByCustomerId(String customerId)
    {
        return userWalletAccountMapper.selectUserWalletAccountByCustomerId(customerId);
    }
}
